package com.one.service;

import com.one.bean.Ticket;
import com.one.bean.User;
import com.one.bean.UserTicket;
import com.one.vo.UserVo;
import org.springframework.cloud.netflix.feign.FeignClient;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
  * @author : zzh
  * @date : 2022/1/17
  * @return :
  * @description : 优惠券功能接口
 */
public interface TicketService {


    /**
     * 查询所有优惠券
     * @return
     */
    List<Ticket> selectTicket();

    /**
     * 兑换现金券，根据现金券所需积分减少用户积分
     * @param ticketId
     * @return
     */
    Boolean conversion(Integer ticketId,HttpServletRequest request,UserVo userVo);

    /**
     * 根据id查询现金券
     * @param ticketId
     * @return
     */
    Ticket ticketById(Integer ticketId);

    /**
     * 将信息传入用户现金券redis
     * @param userTicket
     * @return
     */
    Boolean addUserTicket(UserTicket userTicket);



}
